<?php
class omeauto_order_fail{
	
	public function modify_order_after($sdf){
		  //如果有OME自动确认订单插件的话，会按照自动分确认规则来自动确认订单
        /*if($oAuto = kernel::service('do_autoconfirm')){
            if(method_exists($oAuto,'autoconfirm')){
                $oAuto->autoconfirm($sdf['order_id']);
            }
        }*/
		
		if($sdf['shipping']['is_cod'] == 'true' || $sdf['pay_status'] == '1'){
			if($oAuto = kernel::service('do_autodispatch')){
	            if($sdf['process_status'] != "cancel"){
	                if(method_exists($oAuto,'autodispatch')){
	                    $oAuto->autodispatch($sdf);
	                }
	            }
	        }
		}
	}
}